import Vue from 'vue';
import Router from 'vue-router';
import Index from '@/components/Index';
const ArticleList = resolve => require(['@/components/ArticleList'], resolve);
const ArticleDetail = resolve => require(['@/components/ArticleDetail'], resolve);
const WorksShow = resolve => require(['@/components/WorksShow/index'], resolve);
const WorkDetail = resolve => require(['@/components/WorksShow/WorkDetail'], resolve);
const AddWork = resolve => require(['@/components/WorksShow/AddWork'], resolve);
const DeviceInformation = resolve => require(['@/components/DeviceInformation/Index'], resolve);
const DeviceInformationDetail = resolve => require(['@/components/DeviceInformation/DeviceInformationDetail'], resolve);
const AddDevice = resolve => require(['@/components/DeviceInformation/AddDevice'], resolve);
const PersonalDiaries = resolve => require(['@/components/PersonalDiaries'], resolve);
const PersonalDiaryDetail = resolve => require(['@/components/PersonalDiaryDetail'], resolve);
const DownloadZone = resolve => require(['@/components/downloadZone/index'], resolve);
const Links = resolve => require(['@/components/Links'], resolve);
const NoticeNotice = resolve => require(['@/components/NoticeNotice'], resolve);
const NoticeNoticeDetail = resolve => require(['@/components/NoticeNoticeDetail'], resolve);
const LargeScreenSettings = resolve => require(['@/components/LargeScreenSettings'], resolve);
const ArticleManage = resolve => require(['@/components/ArticleManage/index'], resolve);
const EditArticle = resolve => require(['@/components/ArticleManage/EditArticle'], resolve);
const MessageBook = resolve => require(['@/components/MessageBook/Index'], resolve);
const MessageBookDetail = resolve => require(['@/components/MessageBook/MessageBookDetail'], resolve);
const AddMessageBook = resolve => require(['@/components/MessageBook/AddMessageBook'], resolve);
/**
 * 基础路由
 * @type { *[] }
 */
 export const constantRouterMap = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home', // 首页
    // redirect: '/',
    name: 'Index',
    component: Index
  },
  {
    path: '/articleList', // 文章列表
    name: 'ArticleList',
    component: ArticleList
  },
  {
    path: '/articleList/articleDetail', // 文章详情
    name: 'ArticleDetail',
    component: ArticleDetail
  },
  {
    path: '/worksShow', // 作品展示
    name: 'WorksShow',
    component: WorksShow
  },
  {
    path: '/worksShow/workDetail', // 作品详情
    name: 'WorkDetail',
    component: WorkDetail
  },
  {
    path: '/worksShow/addWork', // 新增人员
    name: 'AddWork',
    component: AddWork
  },
  {
    path: '/deviceInformation', // 设备信息
    name: 'DeviceInformation',
    component: DeviceInformation
  },
  {
    path: '/deviceInformation/deviceInformationDetail', // 设备信息详情
    name: 'DeviceInformationDetail',
    component: DeviceInformationDetail
  },
  // {
  //   path: '/deviceInformation/addDevice', // 新增/编辑设备
  //   name: 'AddDevice',
  //   component: AddDevice
  // },
  {
    path: '/personalDiaries', // 个人日志
    name: 'PersonalDiaries',
    component: PersonalDiaries
  },

  {
    path: '/personalDiaries/personalDiaryDetail', // 日志详情
    name: 'PersonalDiaryDetail',
    component: PersonalDiaryDetail
  },
  {
    path: '/downloadZone', // 下载专区
    name: 'DownloadZone',
    component: DownloadZone
  },
  {
    path: '/links', // 友情链接
    name: 'Links',
    component: Links
  },
  {
    path: '/noticeNotice', // 通知公告
    name: 'NoticeNotice',
    component: NoticeNotice
  },
  {
    path: '/noticeNotice/noticeNoticeDetail', // 通知公告详情
    name: 'NoticeNoticeDetail',
    component: NoticeNoticeDetail
  },
  {
    path: '/messageBook', // 留言簿
    name: 'MessageBook',
    component: MessageBook
  },
  {
    path: '/messageBook/messageBookDetail', // 留言详情
    name: 'MessageBookDetail',
    component: MessageBookDetail
  },
  {
    path: '/messageBook/addMessageBook', // 新增留言
    name: 'AddMessageBook',
    component: AddMessageBook
  },
  // {
  //   path: '/largeScreenSettings', // 设置
  //   name: 'LargeScreenSettings',
  //   component: LargeScreenSettings
  // },
  // {
  //   path: '/articleManage', //文章管理
  //   name: 'ArticleManage',
  //   component: ArticleManage
  // },
  // {
  //   path: '/articleManage/editArticle', // 新增/编辑文章
  //   name: 'EditArticle',
  //   component: EditArticle
  // }
 ]

 /**
 * 走菜单，走权限控制
 * @type {[null,null]}
 */
export const asyncRouterMap = [

]